﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="baoming.aspx.cs" Inherits="weikebuluo.web.wechat.vip.baoming" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../all/css/card.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Scripts/Zepto.js"></script>
    <title>报名</title>
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
        name="viewport">
    <meta name="format-detection" content="telephone=no">
</head>
<body id="carduser" ondragstart="return false;" onselectstart="return false;">
    <section class="body">
    <div class="qiandaobanner">
        <img src="../all/images/VIPtop2.jpg" />
    </div> 
    <div class="cardexplain">
        <ul class="round">
   
            <li class="title mb"><span class="none">在线报名</span></li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>真实姓名</th>
                        <td>
                            <input name="vip_name"  type="text" class="px" id="vip_name" value="<%=vipmodel.vip_name %>"  placeholder="请输入您的姓名" /></td>
                    </tr>
                </table>
            </li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>联系电话</th>
                        <td>
                            <input name="vip_phone"  type="tel" class="px" value="<%=vipmodel.vip_phone %>" id="vip_phone"  placeholder="请输入您的电话" /></td>
                    </tr>
                </table>
            </li>

            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>性别</th>
                        <td>
                        <script type="text/javascript">
                            $(function () {
                                var VIP_Sex = '<%=vipmodel.vip_integral %>';
                                $("#sex").val(VIP_Sex);
                            })
                        </script>
                            <select name="sex" class="dropdown-select" id="vip_integral" >
                                <option selected="selected" value="1">男</option>
                                <option value="0">女</option>
                            </select></td>
                    </tr>
                </table>
            </li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>QQ</th>
                        <td>
                            <input name="age" type="tel" min="1" max="120" class="px" id="vip_qq" value="<%=vipmodel.vip_qq %>" placeholder="请输入您的QQ" /></td>
                    </tr>
                </table>
            </li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>身份证</th>
                        <td>
                            <input name="sheng"  min="1" max="120" class="px" id="vip_email" value="<%=vipmodel.vip_email %>" placeholder="请输入您的身份证号码" /></td>
                    </tr>
                </table>
            </li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>毕业学校</th>
                        <td>
                            <input name="company"  type="text" class="px" id="vip_company" value="<%=vipmodel.vip_company %>" placeholder="请输入您毕业学校" /></td>
                    </tr>
                </table>
            </li>
            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th>报读专业</th>
                        <td>
                           <input name="position" type="text"  min="1" max="120" class="px" id="vip_position" value="<%=vipmodel.vip_position %>" placeholder="请输入您的报读专业" /></td>
                    </tr>
                </table>
            </li>

            <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th valign="top" class="thtop">地址</th>
                        <td>
                            <textarea name="address" class="pxtextarea" style="height: 57px; overflow-y: visible" id="vip_address"  placeholder="请输入您的地址"><%=vipmodel.vip_address %></textarea></td>
                    </tr>
                </table>
            </li>

                                    <li class="nob">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
                    <tr>
                        <th valign="top" class="thtop">备注</th>
                        <td>
                            <textarea name="info" class="pxtextarea" style="height: 99px; overflow-y: visible" id="vip_area" placeholder="请输入备注信息"><%=vipmodel.vip_area%></textarea></td>
                    </tr>
                </table>
            </li>
         
        </ul>
        <div class="footReturn">
        <%if (dtvip.Rows.Count == 0)
          { %>
            <input type="button" class="submit" value="提交报名" name="保 存" class="txtbtn" id="showcard"><%}
          else
          { %><input type="button" class="submit" value="修改信息" name="报名成功" class="txtbtn" id="showcard"><%} %>

          <%if (vipmodel.viplevel_id == 1)
            {%>
            <input type="button" class="submit"  value="审核已过" name="保 存" class="txtbtn" id="Button1">
            <%} %>
            <div class="window" id="windowcenter">
                <div id="title" class="wtitle">保存成功<span class="close" id="alertclose"></span></div>
                <div class="content">
                    <div id="txt"></div>
                </div>
            </div>
        </div>
    </div>
	    </section>
</body>
</html>
<script src="/Scripts/JQuery.min.js" type="text/javascript"></script>
<script src="/Scripts/Su.common.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/ActionRecord.js"></script>
<script type="text/javascript">
    var wxid = getQueryString("wxid");
    var uid = getQueryString("uid");
    var ActionUrl = "baoming.aspx?wxid=" + wxid + "&uid=" + uid;

    $(document).ready(function () {

        $("#showcard").click(function () {
            var vip_name = $("#vip_name").val();
            var vip_phone = $("#vip_phone").val();
            var vip_integral = $("#vip_integral").val();

            var vip_qq = $("#vip_qq").val();
            var vip_email = $("#vip_email").val();
            var vip_company = $("#vip_company").val();
            var vip_position = $("#vip_position").val();
            var vip_address = $("#vip_address").val();
            var vip_area = $("#vip_area").val();
            if (vip_qq == '' || vip_email == '' || vip_company == '' || vip_position == '' || vip_address == '' || vip_area == '') {
                alert("所有信息必填！");
                return;
            }

            var submitData = {
                vip_name: vip_name,
                vip_phone: vip_phone,
                vip_integral: vip_integral,
                vip_qq: vip_qq,
                vip_email: vip_email,
                vip_company: vip_company,
                vip_position: vip_position,
                vip_address: vip_address,
                vip_area: vip_area
            };

            $.ajax({
                url: ActionUrl + "&action=bindvip",
                type: "post",
                data: submitData,
                success: function (data) {
                    data = eval("(" + data + ")");
                    if (data.error == 200) {
                        window.location.href = "baoming.aspx?wxid=" + wxid + "&uid=" + uid;
                    } else {
                        $("#txt").html('<span style="color:red;">' + data.error + '</span>');
                    }
                }
            });
        });
    });

    $("#windowclosebutton").click(function () {
        $("#windowcenter").slideUp(500);

    });
    $("#alertclose").click(function () {
        $("#windowcenter").slideUp(500);

    });
</script>
